package com.runoob.java;

import java.util.Arrays;
import java.util.Date;

public class TestDateDiff {
    /**
     * 两个时间间隔
     */
    public static void main(String[] args) {

        try{
            long start = System.currentTimeMillis();
            System.out.println(new Date() + "\n");

            Thread.sleep(5 * 60 * 10);

            long end = System.currentTimeMillis();
            long diff = end - start;
            System.out.println("Difference = " + diff);
        }catch (Exception e) {
            System.out.println(e.getMessage());
        }
    }
}
